<%@ page import="weaver.hrm.HrmUserVarify" %>
<%@ page import="weaver.hrm.User" %>
<%@ page import="weaver.general.BaseBean" %>
<html>
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<head>
</head>
<body>
</body>
<%
    User user = HrmUserVarify.getUser(request, response);
    int depart = user.getUserDepartment();
    BaseBean baseBean = new BaseBean();
    baseBean.writeLog( "in>>>>>>custompage_gwqzyj.jsp" );

%>
<script type="text/javascript">

    jQuery(document).ready(function () {
        hidedtlrows();
        jQuery("#nbyj").append("<br>");
        jQuery("#ldps").append("<br>");
        jQuery("#zbbmyj").append("<br>");
        jQuery("#xbbmyj").append("<br>");
        jQuery("#ydyj").append("<br>");
        jQuery('.excelOuterTable .td_etype_3 a[title|="下载"]').css({
            'background-size': '15px 15px',
            'width': '15px',
            'height': '15px'
        });//下载图标缩小
        jQuery('img[src*="/images/filetypeicons/"]').css({'width': '15px', 'height': '15px'});//word,pdf,excel图标缩小
        jQuery('.mainTd_4_1 tr').css({'display': 'block', 'height': '31px'});//附件行间距缩小
        //jQuery('.excelOuterTable .td_etype_3 a[title!="下载"]').attr('style','color: #000 !important').trigger('onmouseout');//超链接字体颜色改为黑色


        //重写checkCustomize函数

        checkCustomize = function () {
            if (jQuery("#bty").attr("checked")) {
                ccc('bty');
            }
            if (jQuery("#yy").attr("checked")) {
                ccc('yy');
            }
            if (jQuery("#qq").attr("checked")) {
                ccc('qq');
            }
            if (jQuery("#ty").attr("checked")) {
                ccc('ty');
            }

            return true;
        }
    });

    function ccc(qzid) {
        var qztext = document.getElementById(qzid).value;

        var fonts = document.getElementById('ueditor_0').contentWindow.document.getElementsByTagName("p")[0];

        var qzspan = document.getElementById('ueditor_0').contentWindow.document.getElementById("qzspan");
//alert(fonts)
        if (qzspan == null) {
            var body = document.getElementById('ueditor_0').contentWindow.document.body;

            if (fonts != undefined) {
                var htext = document.getElementById('ueditor_0').contentWindow.document.getElementsByTagName("p")[0].innerHTML;
                //alert(htext);
                document.getElementById('ueditor_0').contentWindow.document.getElementsByTagName("p")[0].innerHTML = '<span id="qzspan">【' + qztext + '】&nbsp;&nbsp;&nbsp;</span>' + htext;
            } else {
                //	alert(body.innerHTML);
                body.innerHTML = '<span id="qzspan">【' + qztext + '】    &nbsp;&nbsp;&nbsp;</span>' + body.innerHTML;

            }
            //var sp = document.getElementById('ueditor_0').contentWindow.document.getElementsByTagName("span")[0];
        } else {
            //alert(document.getElementById('ueditor_0').contentWindow.document.getElementById("qzspan").innerHTML);
//	alert(document.getElementById('ueditor_0').contentWindow.document.getElementById("qzspan").innerHTML);
            document.getElementById('ueditor_0').contentWindow.document.getElementById("qzspan").innerHTML = '【' + qztext + '】';
        }
    }

    function hidedtlrows() {
        var dlrbm = <%=depart%>;//登录人部门
        jQuery("input[name='check_node_1']").each(function (i) {
            var indexnum = this.value;
            console.log("indexnum =" + indexnum);
            if(dlrbm !=""){
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm != dlrbm){
                    jQuery("#field19750" + "_" + indexnum).parent('td').parent('tr').hide();
                }
            }

            if (indexnum === 0) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19716").val(xbbm);
                }
            } else if (indexnum === 1) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19717").val(xbbm);
                }
            } else if (indexnum === 2) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19718").val(xbbm);
                }
            } else if (indexnum === 3) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19719").val(xbbm);
                }
            } else if (indexnum === 4) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19720").val(xbbm);
                }
            } else if (indexnum === 5) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19721").val(xbbm);
                }
            } else if (indexnum === 6) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19722").val(xbbm);
                }
            } else if (indexnum === 7) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19723").val(xbbm);
                }
            } else if (indexnum === 8) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19724").val(xbbm);
                }
            } else if (indexnum === 9) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19725").val(xbbm);
                }
            }else if (indexnum === 10) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19726").val(xbbm);
                }
            }else if (indexnum === 11) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19727").val(xbbm);
                }
            }else if (indexnum === 12) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19728").val(xbbm);
                }
            }else if (indexnum === 13) {
                var xbbm = jQuery("#field19750" + "_" + indexnum).val();
                if(xbbm !=""){
                    jQuery("#field19729").val(xbbm);

                }
            }
        });
    }

</script>
</html>